www.gusucode.com > VC++ 小型学生选课管理系统-源码程序 > VC++ 小型学生选课管理系统-源码程序/code/Student/StudentSet.cpp

    //Download by http://www.NewXing.com
// StudentSet.cpp : implementation of the CStudentSet class
//

#include "stdafx.h"
#include "Student.h"
#include "StudentSet.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CStudentSet implementation

IMPLEMENT_DYNAMIC(CStudentSet, CRecordset)

CStudentSet::CStudentSet(CDatabase* pdb)
	: CRecordset(pdb)
{
	//{{AFX_FIELD_INIT(CStudentSet)
	m_Sno = _T("");
	m_Sname = _T("");
	m_Ssex = _T("");
	m_Sage = 0;
	m_Sdept = _T("");
	m_nFields = 5;
	//}}AFX_FIELD_INIT
	m_nDefaultType = snapshot;
}

CString CStudentSet::GetDefaultConnect()
{
	return _T("ODBC;DSN=Student");
}

CString CStudentSet::GetDefaultSQL()
{
	return _T("[dbo].[Student]");
}

void CStudentSet::DoFieldExchange(CFieldExchange* pFX)
{
	//{{AFX_FIELD_MAP(CStudentSet)
	pFX->SetFieldType(CFieldExchange::outputColumn);
	RFX_Text(pFX, _T("[Sno]"), m_Sno);
	RFX_Text(pFX, _T("[Sname]"), m_Sname);
	RFX_Text(pFX, _T("[Ssex]"), m_Ssex);
	RFX_Long(pFX, _T("[Sage]"), m_Sage);
	RFX_Text(pFX, _T("[Sdept]"), m_Sdept);
	//}}AFX_FIELD_MAP
}

/////////////////////////////////////////////////////////////////////////////
// CStudentSet diagnostics

#ifdef _DEBUG
void CStudentSet::AssertValid() const
{
	CRecordset::AssertValid();
}

void CStudentSet::Dump(CDumpContext& dc) const
{
	CRecordset::Dump(dc);
}
#endif //_DEBUG